package com.healthdata.dao;

import com.healthdata.entity.ComprehensiveHospitalCost;
import com.healthdata.vo.MedicalCostTrendVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ComprehensiveHospitalCostMapper {

    /**
     * 查询所有医疗费用数据
     */
    List<ComprehensiveHospitalCost> findAll();

    /**
     * 按级别和年份查询医疗费用数据
     */
    List<ComprehensiveHospitalCost> findByLevelAndYear(
            @Param("level") String level,
            @Param("years") List<Integer> years);

    /**
     * 查询所有年份
     */
    List<Integer> findAllYears();

    /**
     * 查询所有级别
     */
    @Select("SELECT DISTINCT level FROM comprehensive_hospital_cost")
    List<String> findAllLevels();


    List<ComprehensiveHospitalCost> findByYear(@Param("year") Integer year);
    /**
     * 按年份查询总成本、医药费、检查费数据
     */
    List<ComprehensiveHospitalCost> findCostDataByYear(@Param("level") String level, @Param("year") Integer year);
}